/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package recursion;

/**
 *
 * @author parallels
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        testFact(0);
        testFact(1);
        testFact(2);
        testFact(3);
        testFact(4);
        
        for (int i=0; i<=15; ++i) {
            testFibonacci(i);
        }
    }
    
    private static void testFact(int n) {
        System.out.println (n + " factorial = " 
                + Factorial.calc(n) + " , " 
                + Factorial.recursiveCalc(n) + "-" + Factorial.cont);
    }
    
    private static void testFibonacci(int n) {
        System.out.println (n + " Fibonacci = " 
                + Fibonacci.calc(n) + " , " 
                + Fibonacci.recursiveCalc(n));
    }
    
}
